package com.example.design.factory.phone.simple.factory;

import com.example.design.factory.phone.simple.abstractproduct.Phone;
import com.example.design.factory.phone.simple.abstractproduct.ApplePhone;
import com.example.design.factory.phone.simple.abstractproduct.MiPhone;

/**
 * @Description TODO
 * @ClassName PhoneFactory
 * @Author Administrator
 * @Date 2020/5/13 19:23
 * @Version 1.0.0
 */
public class PhoneFactory {

    public Phone makePhone(String phoneType){
        if("MiPhone".equalsIgnoreCase(phoneType)){
            return new MiPhone();
        } else if("applePhone".equalsIgnoreCase(phoneType)){
            return new ApplePhone();
        }
        return null;
    }
}
